package com.etc.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * tbl_goods
 * @author 
 */
public class Goods implements Serializable {
    /**
     * 商品序号
     */
    private Integer goodsid;

    /**
     * 商品名
     */
    private String goodsname;

    /**
     * 价格
     */
    private Double goodsprice;

    /**
     * 商品简介
     */
    private String goodsinfo;

    /**
     * 库存
     */
    private Integer goodscount;

    /**
     * 图片地址
     */
    private String cover;

    /**
     * 图片地址
     */
    private Integer typeid;

    /**
     * 店铺编号
     */
    private Integer shopid;

    /**
     * 商品状态
     */
    private Integer goodsstate;

    /**
     * 上架时间
     */
    private Date publishdate;

    private static final long serialVersionUID = 1L;

    public Integer getGoodsid() {
        return goodsid;
    }

    public void setGoodsid(Integer goodsid) {
        this.goodsid = goodsid;
    }

    public String getGoodsname() {
        return goodsname;
    }

    public void setGoodsname(String goodsname) {
        this.goodsname = goodsname;
    }

    public Double getGoodsprice() {
        return goodsprice;
    }

    public void setGoodsprice(Double goodsprice) {
        this.goodsprice = goodsprice;
    }

    public String getGoodsinfo() {
        return goodsinfo;
    }

    public void setGoodsinfo(String goodsinfo) {
        this.goodsinfo = goodsinfo;
    }

    public Integer getGoodscount() {
        return goodscount;
    }

    public void setGoodscount(Integer goodscount) {
        this.goodscount = goodscount;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public Integer getTypeid() {
        return typeid;
    }

    public void setTypeid(Integer typeid) {
        this.typeid = typeid;
    }

    public Integer getShopid() {
        return shopid;
    }

    public void setShopid(Integer shopid) {
        this.shopid = shopid;
    }

    public Integer getGoodsstate() {
        return goodsstate;
    }

    public void setGoodsstate(Integer goodsstate) {
        this.goodsstate = goodsstate;
    }

    public Date getPublishdate() {
        return publishdate;
    }

    public void setPublishdate(Date publishdate) {
        this.publishdate = publishdate;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Goods other = (Goods) that;
        return (this.getGoodsid() == null ? other.getGoodsid() == null : this.getGoodsid().equals(other.getGoodsid()))
            && (this.getGoodsname() == null ? other.getGoodsname() == null : this.getGoodsname().equals(other.getGoodsname()))
            && (this.getGoodsprice() == null ? other.getGoodsprice() == null : this.getGoodsprice().equals(other.getGoodsprice()))
            && (this.getGoodsinfo() == null ? other.getGoodsinfo() == null : this.getGoodsinfo().equals(other.getGoodsinfo()))
            && (this.getGoodscount() == null ? other.getGoodscount() == null : this.getGoodscount().equals(other.getGoodscount()))
            && (this.getCover() == null ? other.getCover() == null : this.getCover().equals(other.getCover()))
            && (this.getTypeid() == null ? other.getTypeid() == null : this.getTypeid().equals(other.getTypeid()))
            && (this.getShopid() == null ? other.getShopid() == null : this.getShopid().equals(other.getShopid()))
            && (this.getGoodsstate() == null ? other.getGoodsstate() == null : this.getGoodsstate().equals(other.getGoodsstate()))
            && (this.getPublishdate() == null ? other.getPublishdate() == null : this.getPublishdate().equals(other.getPublishdate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGoodsid() == null) ? 0 : getGoodsid().hashCode());
        result = prime * result + ((getGoodsname() == null) ? 0 : getGoodsname().hashCode());
        result = prime * result + ((getGoodsprice() == null) ? 0 : getGoodsprice().hashCode());
        result = prime * result + ((getGoodsinfo() == null) ? 0 : getGoodsinfo().hashCode());
        result = prime * result + ((getGoodscount() == null) ? 0 : getGoodscount().hashCode());
        result = prime * result + ((getCover() == null) ? 0 : getCover().hashCode());
        result = prime * result + ((getTypeid() == null) ? 0 : getTypeid().hashCode());
        result = prime * result + ((getShopid() == null) ? 0 : getShopid().hashCode());
        result = prime * result + ((getGoodsstate() == null) ? 0 : getGoodsstate().hashCode());
        result = prime * result + ((getPublishdate() == null) ? 0 : getPublishdate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", goodsid=").append(goodsid);
        sb.append(", goodsname=").append(goodsname);
        sb.append(", goodsprice=").append(goodsprice);
        sb.append(", goodsinfo=").append(goodsinfo);
        sb.append(", goodscount=").append(goodscount);
        sb.append(", cover=").append(cover);
        sb.append(", typeid=").append(typeid);
        sb.append(", shopid=").append(shopid);
        sb.append(", goodsstate=").append(goodsstate);
        sb.append(", publishdate=").append(publishdate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}